import { request } from '@/request'
import { OrdersStatisticsResult, StatisticParams, TopResult, TurnoverResult, UserStatisticsResult } from '@/types/statistics'

export function getTurnoverStatisticsApi(params: StatisticParams) {
  return request<TurnoverResult>(
    '/admin/report/turnoverStatistics', "get", params
  )
}

export function getOrdersStatisticsApi(params: StatisticParams) {
  return request<OrdersStatisticsResult>(
    '/admin/report/ordersStatistics', "get",params
  )
}

export function getTopApi(params: StatisticParams) {
  return request<TopResult>(
    '/admin/report/top10', "get", params
  )
}

export function getUserStatisticsApi(params: StatisticParams) {
  return request<UserStatisticsResult>(
    '/admin/report/userStatistics', "get", params
  )
}
